<%--
  Created by IntelliJ IDEA.
  User: 华哥
  Date: 2021/5/23
  Time: 13:17
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 86135
  Date: 2021/5/10
  Time: 8:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>


<!DOCTYPE html>
<html>

<head>
    <style type="text/css">

        body{
            background-color: #7ecff4;
        }
        td{
            border: 1px solid white;
            font-size: 20px;

        }
        table{
            position: absolute;
            left: 10px;
        }
        .selectForm{

            padding-left: 200px;
            font-size: 30px;
            /*border: 1px solid red;*/
            height: 500px;
            width: 50%;
            /*background-color:#eae9e9;*/
            margin-left: 250px;
        }
        .selectForm-submit{
            background-color: orangered;
            width: 100px;
            height: 30px;
            font-size: 20px;
            color: white;
            margin-left: 100px;
        }
        .selectForm input{
            text-align:center;
            line-height:30px;
        }
        h2{
            text-align:center;
        }
    </style>
    <meta charset="utf-8">
    <title>Layui</title>
    <%
        //获取项目的根路径
        String path = request.getContextPath();
        String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="<%=basePath%>/layui/css/layui.css"  media="all">
    <script src="<%=basePath%>/layui/layui.js" charset="utf-8"></script>
    <link rel="shortcut icon" href="#"/>
    <script type="text/javascript" src="<%=basePath%>/jquery-1.12.4.js"></script>
</head>
<body>

<div style="padding: 15px;">
    <%--            查询表单--%>
    <div class="selectForm">
        <form action="<%=basePath%>ReaderLogin?tp=selectBook" method="post">
            书名:<input type="text" name="bookname" id="bookName"><br>
            作者:<input type="text" name="author" id="zuozhe"><br>
            <input name="zz" type="submit" class="selectForm-submit" value="提交">
            <input type="button" value="重置" id="chongzhi" class="selectForm-submit">
            <table class="layui-table" lay-even="" lay-skin="nob">
                <colgroup>
                    <col width="150">
                    <col width="150">
                    <col width="200">
                    <col>
                </colgroup>
                <thead>
                <tr>
                    <td>编号</td>
                    <td>书名</td>
                    <td>书籍分类</td>
                    <td>作者</td>
                    <td>库存</td>
                    <td>价格</td>
                    <td>书籍位置</td>

                </tr>
                </thead>
                <tbody>
                <c:forEach items="${list}" var="li">
                <tr>
                    <td>${li.id}</td>
                    <td>${li.bookName}</td>
                    <td>${li.typeName}</td>
                    <td>${li.author}</td>
                    <td>${li.sum}</td>
                    <td>${li.price}</td>
                    <td>${li.location}</td>
                </tr>
                </c:forEach>
            </table>
        </form>
    </div>
</div>
<%--    </div>--%>
<%--    <div class="layui-footer">--%>
<%--        <!-- 底部固定区域 -->--%>
<%--       <h2>华子图书馆</h2>--%>
<%--    </div>--%>
<%--</div>--%>

<script type="text/javascript">
    $(function () {
        $("#chongzhi").click(function (){
            $("#bookName").val("");
            $("#zuozhe").val("");
        })

    })

</script>
</body>
</html>

